// Copyright 2021 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "build/build_config.h"
#include "chrome/browser/sync/test/integration/two_client_web_apps_integration_test_base.h"
#include "content/public/test/browser_test.h"

namespace web_app {

// This test is a part of the web app integration test suite, which is
// documented in //chrome/browser/ui/views/web_apps/README.md. For information
// about diagnosing, debugging and/or disabling tests, please look to the
// README file.

namespace {

using TwoClientWebAppsIntegrationTestMacWinLinux =
    TwoClientWebAppsIntegrationTestBase;

// TODO(crbug.com/1273666): Test failed on Mac.
// TODO(crbug.com/1281950): Browsers size failure on Mac.
#if BUILDFLAG(IS_MAC)
#define MAYBE_WebAppIntegration_InstCrtShctWindowedSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_InstLocallySiteA_InListWinSiteA_NavSiteA_InstIconNotShown_LaunchIconShown \
  DISABLED_WebAppIntegration_InstCrtShctWindowedSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_InstLocallySiteA_InListWinSiteA_NavSiteA_InstIconNotShown_LaunchIconShown
#else
#define MAYBE_WebAppIntegration_InstCrtShctWindowedSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_InstLocallySiteA_InListWinSiteA_NavSiteA_InstIconNotShown_LaunchIconShown \
  WebAppIntegration_InstCrtShctWindowedSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_InstLocallySiteA_InListWinSiteA_NavSiteA_InstIconNotShown_LaunchIconShown
#endif
IN_PROC_BROWSER_TEST_F(
    TwoClientWebAppsIntegrationTestMacWinLinux,
    MAYBE_WebAppIntegration_InstCrtShctWindowedSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_InstLocallySiteA_InListWinSiteA_NavSiteA_InstIconNotShown_LaunchIconShown) {
  // Test contents are generated by script. Please do not modify!
  // See `chrome/test/webapps/README.md` for more info.
  // Sheriffs: Disabling this test is supported.
  helper_.InstallCreateShortcutWindowed("SiteA");
  helper_.CheckWindowCreated();
  helper_.CheckAppInListWindowed("SiteA");
  helper_.SwitchProfileClients("Client2");
  helper_.CheckAppInListNotLocallyInstalled("SiteA");
  helper_.InstallLocally("SiteA");
  helper_.CheckAppInListWindowed("SiteA");
  helper_.NavigateBrowser("SiteA");
  helper_.CheckInstallIconNotShown();
  helper_.CheckLaunchIconShown();
}

// TODO(crbug.com/1273666): Test failed on Mac.
// TODO(crbug.com/1281950): Browsers size failure on Mac.
#if BUILDFLAG(IS_MAC)
#define MAYBE_WebAppIntegration_InstCrtShctWindowedSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_InstLocallySiteA_InListWinSiteA_LaunchFromListSiteA_WindowCreated \
  DISABLED_WebAppIntegration_InstCrtShctWindowedSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_InstLocallySiteA_InListWinSiteA_LaunchFromListSiteA_WindowCreated
#else
#define MAYBE_WebAppIntegration_InstCrtShctWindowedSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_InstLocallySiteA_InListWinSiteA_LaunchFromListSiteA_WindowCreated \
  WebAppIntegration_InstCrtShctWindowedSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_InstLocallySiteA_InListWinSiteA_LaunchFromListSiteA_WindowCreated
#endif
IN_PROC_BROWSER_TEST_F(
    TwoClientWebAppsIntegrationTestMacWinLinux,
    MAYBE_WebAppIntegration_InstCrtShctWindowedSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_InstLocallySiteA_InListWinSiteA_LaunchFromListSiteA_WindowCreated) {
  // Test contents are generated by script. Please do not modify!
  // See `chrome/test/webapps/README.md` for more info.
  // Sheriffs: Disabling this test is supported.
  helper_.InstallCreateShortcutWindowed("SiteA");
  helper_.CheckWindowCreated();
  helper_.CheckAppInListWindowed("SiteA");
  helper_.SwitchProfileClients("Client2");
  helper_.CheckAppInListNotLocallyInstalled("SiteA");
  helper_.InstallLocally("SiteA");
  helper_.CheckAppInListWindowed("SiteA");
  helper_.LaunchFromChromeApps("SiteA");
  helper_.CheckWindowCreated();
}

// TODO(crbug.com/1273666): Test failed on Mac.
// TODO(crbug.com/1281950): Browsers size failure on Mac.
#if BUILDFLAG(IS_MAC)
#define MAYBE_WebAppIntegration_InstCrtShctWindowedSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_LaunchFromListSiteA_TabCreated \
  DISABLED_WebAppIntegration_InstCrtShctWindowedSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_LaunchFromListSiteA_TabCreated
#else
#define MAYBE_WebAppIntegration_InstCrtShctWindowedSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_LaunchFromListSiteA_TabCreated \
  WebAppIntegration_InstCrtShctWindowedSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_LaunchFromListSiteA_TabCreated
#endif
IN_PROC_BROWSER_TEST_F(
    TwoClientWebAppsIntegrationTestMacWinLinux,
    MAYBE_WebAppIntegration_InstCrtShctWindowedSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_LaunchFromListSiteA_TabCreated) {
  // Test contents are generated by script. Please do not modify!
  // See `chrome/test/webapps/README.md` for more info.
  // Sheriffs: Disabling this test is supported.
  helper_.InstallCreateShortcutWindowed("SiteA");
  helper_.CheckWindowCreated();
  helper_.CheckAppInListWindowed("SiteA");
  helper_.SwitchProfileClients("Client2");
  helper_.CheckAppInListNotLocallyInstalled("SiteA");
  helper_.LaunchFromChromeApps("SiteA");
  helper_.CheckTabCreated();
}

// TODO(crbug.com/1273666): Test failed on Mac.
// TODO(crbug.com/1281950): Browsers size failure on Mac.
#if BUILDFLAG(IS_MAC)
#define MAYBE_WebAppIntegration_InstCrtShctWindowedSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_NavSiteA_InstIconShown_LaunchIconNotShown \
  DISABLED_WebAppIntegration_InstCrtShctWindowedSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_NavSiteA_InstIconShown_LaunchIconNotShown
#else
#define MAYBE_WebAppIntegration_InstCrtShctWindowedSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_NavSiteA_InstIconShown_LaunchIconNotShown \
  WebAppIntegration_InstCrtShctWindowedSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_NavSiteA_InstIconShown_LaunchIconNotShown
#endif
IN_PROC_BROWSER_TEST_F(
    TwoClientWebAppsIntegrationTestMacWinLinux,
    MAYBE_WebAppIntegration_InstCrtShctWindowedSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_NavSiteA_InstIconShown_LaunchIconNotShown) {
  // Test contents are generated by script. Please do not modify!
  // See `chrome/test/webapps/README.md` for more info.
  // Sheriffs: Disabling this test is supported.
  helper_.InstallCreateShortcutWindowed("SiteA");
  helper_.CheckWindowCreated();
  helper_.CheckAppInListWindowed("SiteA");
  helper_.SwitchProfileClients("Client2");
  helper_.CheckAppInListNotLocallyInstalled("SiteA");
  helper_.NavigateBrowser("SiteA");
  helper_.CheckInstallIconShown();
  helper_.CheckLaunchIconNotShown();
}

// TODO(crbug.com/1273666): Test failed on Mac.
// TODO(crbug.com/1281950): Browsers size failure on Mac.
#if BUILDFLAG(IS_MAC)
#define MAYBE_WebAppIntegration_InstOmniboxSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_InstLocallySiteA_InListWinSiteA_NavSiteA_InstIconNotShown_LaunchIconShown \
  DISABLED_WebAppIntegration_InstOmniboxSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_InstLocallySiteA_InListWinSiteA_NavSiteA_InstIconNotShown_LaunchIconShown
#else
#define MAYBE_WebAppIntegration_InstOmniboxSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_InstLocallySiteA_InListWinSiteA_NavSiteA_InstIconNotShown_LaunchIconShown \
  WebAppIntegration_InstOmniboxSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_InstLocallySiteA_InListWinSiteA_NavSiteA_InstIconNotShown_LaunchIconShown
#endif
IN_PROC_BROWSER_TEST_F(
    TwoClientWebAppsIntegrationTestMacWinLinux,
    MAYBE_WebAppIntegration_InstOmniboxSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_InstLocallySiteA_InListWinSiteA_NavSiteA_InstIconNotShown_LaunchIconShown) {
  // Test contents are generated by script. Please do not modify!
  // See `chrome/test/webapps/README.md` for more info.
  // Sheriffs: Disabling this test is supported.
  helper_.InstallOmniboxIcon("SiteA");
  helper_.CheckWindowCreated();
  helper_.CheckAppInListWindowed("SiteA");
  helper_.SwitchProfileClients("Client2");
  helper_.CheckAppInListNotLocallyInstalled("SiteA");
  helper_.InstallLocally("SiteA");
  helper_.CheckAppInListWindowed("SiteA");
  helper_.NavigateBrowser("SiteA");
  helper_.CheckInstallIconNotShown();
  helper_.CheckLaunchIconShown();
}

// TODO(crbug.com/1273666): Test failed on Mac.
// TODO(crbug.com/1281950): Browsers size failure on Mac.
#if BUILDFLAG(IS_MAC)
#define MAYBE_WebAppIntegration_InstOmniboxSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_InstLocallySiteA_InListWinSiteA_LaunchFromListSiteA_WindowCreated \
  DISABLED_WebAppIntegration_InstOmniboxSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_InstLocallySiteA_InListWinSiteA_LaunchFromListSiteA_WindowCreated
#else
#define MAYBE_WebAppIntegration_InstOmniboxSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_InstLocallySiteA_InListWinSiteA_LaunchFromListSiteA_WindowCreated \
  WebAppIntegration_InstOmniboxSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_InstLocallySiteA_InListWinSiteA_LaunchFromListSiteA_WindowCreated
#endif
IN_PROC_BROWSER_TEST_F(
    TwoClientWebAppsIntegrationTestMacWinLinux,
    MAYBE_WebAppIntegration_InstOmniboxSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_InstLocallySiteA_InListWinSiteA_LaunchFromListSiteA_WindowCreated) {
  // Test contents are generated by script. Please do not modify!
  // See `chrome/test/webapps/README.md` for more info.
  // Sheriffs: Disabling this test is supported.
  helper_.InstallOmniboxIcon("SiteA");
  helper_.CheckWindowCreated();
  helper_.CheckAppInListWindowed("SiteA");
  helper_.SwitchProfileClients("Client2");
  helper_.CheckAppInListNotLocallyInstalled("SiteA");
  helper_.InstallLocally("SiteA");
  helper_.CheckAppInListWindowed("SiteA");
  helper_.LaunchFromChromeApps("SiteA");
  helper_.CheckWindowCreated();
}

// TODO(crbug.com/1273666): Test failed on Mac.
// TODO(crbug.com/1281950): Browsers size failure on Mac.
#if BUILDFLAG(IS_MAC)
#define MAYBE_WebAppIntegration_InstOmniboxSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_LaunchFromListSiteA_TabCreated \
  DISABLED_WebAppIntegration_InstOmniboxSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_LaunchFromListSiteA_TabCreated
#else
#define MAYBE_WebAppIntegration_InstOmniboxSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_LaunchFromListSiteA_TabCreated \
  WebAppIntegration_InstOmniboxSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_LaunchFromListSiteA_TabCreated
#endif
IN_PROC_BROWSER_TEST_F(
    TwoClientWebAppsIntegrationTestMacWinLinux,
    MAYBE_WebAppIntegration_InstOmniboxSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_LaunchFromListSiteA_TabCreated) {
  // Test contents are generated by script. Please do not modify!
  // See `chrome/test/webapps/README.md` for more info.
  // Sheriffs: Disabling this test is supported.
  helper_.InstallOmniboxIcon("SiteA");
  helper_.CheckWindowCreated();
  helper_.CheckAppInListWindowed("SiteA");
  helper_.SwitchProfileClients("Client2");
  helper_.CheckAppInListNotLocallyInstalled("SiteA");
  helper_.LaunchFromChromeApps("SiteA");
  helper_.CheckTabCreated();
}

// TODO(crbug.com/1273666): Test failed on Mac.
#if BUILDFLAG(IS_MAC)
#define MAYBE_WebAppIntegration_InstOmniboxSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_NavSiteA_InstIconShown_LaunchIconNotShown \
  DISABLED_WebAppIntegration_InstOmniboxSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_NavSiteA_InstIconShown_LaunchIconNotShown
#else
#define MAYBE_WebAppIntegration_InstOmniboxSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_NavSiteA_InstIconShown_LaunchIconNotShown \
  WebAppIntegration_InstOmniboxSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_NavSiteA_InstIconShown_LaunchIconNotShown
#endif
IN_PROC_BROWSER_TEST_F(
    TwoClientWebAppsIntegrationTestMacWinLinux,
    MAYBE_WebAppIntegration_InstOmniboxSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_NavSiteA_InstIconShown_LaunchIconNotShown) {
  // Test contents are generated by script. Please do not modify!
  // See `chrome/test/webapps/README.md` for more info.
  // Sheriffs: Disabling this test is supported.
  helper_.InstallOmniboxIcon("SiteA");
  helper_.CheckWindowCreated();
  helper_.CheckAppInListWindowed("SiteA");
  helper_.SwitchProfileClients("Client2");
  helper_.CheckAppInListNotLocallyInstalled("SiteA");
  helper_.NavigateBrowser("SiteA");
  helper_.CheckInstallIconShown();
  helper_.CheckLaunchIconNotShown();
}

// TODO(crbug.com/1273666): Test failed on Mac.
// TODO(crbug.com/1281950): Browsers size failure on Mac.
#if BUILDFLAG(IS_MAC)
#define MAYBE_WebAppIntegration_InstMenuOptionSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_InstLocallySiteA_InListWinSiteA_NavSiteA_InstIconNotShown_LaunchIconShown \
  DISABLED_WebAppIntegration_InstMenuOptionSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_InstLocallySiteA_InListWinSiteA_NavSiteA_InstIconNotShown_LaunchIconShown
#else
#define MAYBE_WebAppIntegration_InstMenuOptionSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_InstLocallySiteA_InListWinSiteA_NavSiteA_InstIconNotShown_LaunchIconShown \
  WebAppIntegration_InstMenuOptionSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_InstLocallySiteA_InListWinSiteA_NavSiteA_InstIconNotShown_LaunchIconShown
#endif
IN_PROC_BROWSER_TEST_F(
    TwoClientWebAppsIntegrationTestMacWinLinux,
    MAYBE_WebAppIntegration_InstMenuOptionSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_InstLocallySiteA_InListWinSiteA_NavSiteA_InstIconNotShown_LaunchIconShown) {
  // Test contents are generated by script. Please do not modify!
  // See `chrome/test/webapps/README.md` for more info.
  // Sheriffs: Disabling this test is supported.
  helper_.InstallMenuOption("SiteA");
  helper_.CheckWindowCreated();
  helper_.CheckAppInListWindowed("SiteA");
  helper_.SwitchProfileClients("Client2");
  helper_.CheckAppInListNotLocallyInstalled("SiteA");
  helper_.InstallLocally("SiteA");
  helper_.CheckAppInListWindowed("SiteA");
  helper_.NavigateBrowser("SiteA");
  helper_.CheckInstallIconNotShown();
  helper_.CheckLaunchIconShown();
}

// TODO(crbug.com/1273666): Test failed on Mac.
// TODO(crbug.com/1281950): Browsers size failure on Mac.
#if BUILDFLAG(IS_MAC)
#define MAYBE_WebAppIntegration_InstMenuOptionSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_InstLocallySiteA_InListWinSiteA_LaunchFromListSiteA_WindowCreated \
  DISABLED_WebAppIntegration_InstMenuOptionSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_InstLocallySiteA_InListWinSiteA_LaunchFromListSiteA_WindowCreated
#else
#define MAYBE_WebAppIntegration_InstMenuOptionSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_InstLocallySiteA_InListWinSiteA_LaunchFromListSiteA_WindowCreated \
  WebAppIntegration_InstMenuOptionSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_InstLocallySiteA_InListWinSiteA_LaunchFromListSiteA_WindowCreated
#endif
IN_PROC_BROWSER_TEST_F(
    TwoClientWebAppsIntegrationTestMacWinLinux,
    MAYBE_WebAppIntegration_InstMenuOptionSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_InstLocallySiteA_InListWinSiteA_LaunchFromListSiteA_WindowCreated) {
  // Test contents are generated by script. Please do not modify!
  // See `chrome/test/webapps/README.md` for more info.
  // Sheriffs: Disabling this test is supported.
  helper_.InstallMenuOption("SiteA");
  helper_.CheckWindowCreated();
  helper_.CheckAppInListWindowed("SiteA");
  helper_.SwitchProfileClients("Client2");
  helper_.CheckAppInListNotLocallyInstalled("SiteA");
  helper_.InstallLocally("SiteA");
  helper_.CheckAppInListWindowed("SiteA");
  helper_.LaunchFromChromeApps("SiteA");
  helper_.CheckWindowCreated();
}

// TODO(crbug.com/1273666): Test failed on Mac.
// TODO(crbug.com/1281950): Browsers size failure on Mac.
#if BUILDFLAG(IS_MAC)
#define MAYBE_WebAppIntegration_InstMenuOptionSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_LaunchFromListSiteA_TabCreated \
  DISABLED_WebAppIntegration_InstMenuOptionSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_LaunchFromListSiteA_TabCreated
#else
#define MAYBE_WebAppIntegration_InstMenuOptionSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_LaunchFromListSiteA_TabCreated \
  WebAppIntegration_InstMenuOptionSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_LaunchFromListSiteA_TabCreated
#endif
IN_PROC_BROWSER_TEST_F(
    TwoClientWebAppsIntegrationTestMacWinLinux,
    MAYBE_WebAppIntegration_InstMenuOptionSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_LaunchFromListSiteA_TabCreated) {
  // Test contents are generated by script. Please do not modify!
  // See `chrome/test/webapps/README.md` for more info.
  // Sheriffs: Disabling this test is supported.
  helper_.InstallMenuOption("SiteA");
  helper_.CheckWindowCreated();
  helper_.CheckAppInListWindowed("SiteA");
  helper_.SwitchProfileClients("Client2");
  helper_.CheckAppInListNotLocallyInstalled("SiteA");
  helper_.LaunchFromChromeApps("SiteA");
  helper_.CheckTabCreated();
}

// TODO(crbug.com/1273666): Test failed on Mac.
// TODO(crbug.com/1281950): Browsers size failure on Mac.
#if BUILDFLAG(IS_MAC)
#define MAYBE_WebAppIntegration_InstMenuOptionSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_NavSiteA_InstIconShown_LaunchIconNotShown \
  DISABLED_WebAppIntegration_InstMenuOptionSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_NavSiteA_InstIconShown_LaunchIconNotShown
#else
#define MAYBE_WebAppIntegration_InstMenuOptionSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_NavSiteA_InstIconShown_LaunchIconNotShown \
  WebAppIntegration_InstMenuOptionSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_NavSiteA_InstIconShown_LaunchIconNotShown
#endif
IN_PROC_BROWSER_TEST_F(
    TwoClientWebAppsIntegrationTestMacWinLinux,
    MAYBE_WebAppIntegration_InstMenuOptionSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_NavSiteA_InstIconShown_LaunchIconNotShown) {
  // Test contents are generated by script. Please do not modify!
  // See `chrome/test/webapps/README.md` for more info.
  // Sheriffs: Disabling this test is supported.
  helper_.InstallMenuOption("SiteA");
  helper_.CheckWindowCreated();
  helper_.CheckAppInListWindowed("SiteA");
  helper_.SwitchProfileClients("Client2");
  helper_.CheckAppInListNotLocallyInstalled("SiteA");
  helper_.NavigateBrowser("SiteA");
  helper_.CheckInstallIconShown();
  helper_.CheckLaunchIconNotShown();
}

IN_PROC_BROWSER_TEST_F(
    TwoClientWebAppsIntegrationTestMacWinLinux,
    WebAppIntegration_InstCrtShctTabbedSiteA_InListTabbedSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_InstLocallySiteA_InListTabbedSiteA_NavSiteA_InstIconShown_LaunchIconNotShown) {
  // Test contents are generated by script. Please do not modify!
  // See `chrome/test/webapps/README.md` for more info.
  // Sheriffs: Disabling this test is supported.
  helper_.InstallCreateShortcutTabbed("SiteA");
  helper_.CheckAppInListTabbed("SiteA");
  helper_.SwitchProfileClients("Client2");
  helper_.CheckAppInListNotLocallyInstalled("SiteA");
  helper_.InstallLocally("SiteA");
  helper_.CheckAppInListTabbed("SiteA");
  helper_.NavigateBrowser("SiteA");
  helper_.CheckInstallIconShown();
  helper_.CheckLaunchIconNotShown();
}

IN_PROC_BROWSER_TEST_F(
    TwoClientWebAppsIntegrationTestMacWinLinux,
    WebAppIntegration_InstCrtShctTabbedSiteA_InListTabbedSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_InstLocallySiteA_InListTabbedSiteA_LaunchFromListSiteA_TabCreated) {
  // Test contents are generated by script. Please do not modify!
  // See `chrome/test/webapps/README.md` for more info.
  // Sheriffs: Disabling this test is supported.
  helper_.InstallCreateShortcutTabbed("SiteA");
  helper_.CheckAppInListTabbed("SiteA");
  helper_.SwitchProfileClients("Client2");
  helper_.CheckAppInListNotLocallyInstalled("SiteA");
  helper_.InstallLocally("SiteA");
  helper_.CheckAppInListTabbed("SiteA");
  helper_.LaunchFromChromeApps("SiteA");
  helper_.CheckTabCreated();
}

IN_PROC_BROWSER_TEST_F(
    TwoClientWebAppsIntegrationTestMacWinLinux,
    WebAppIntegration_InstCrtShctTabbedSiteA_InListTabbedSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_LaunchFromListSiteA_TabCreated) {
  // Test contents are generated by script. Please do not modify!
  // See `chrome/test/webapps/README.md` for more info.
  // Sheriffs: Disabling this test is supported.
  helper_.InstallCreateShortcutTabbed("SiteA");
  helper_.CheckAppInListTabbed("SiteA");
  helper_.SwitchProfileClients("Client2");
  helper_.CheckAppInListNotLocallyInstalled("SiteA");
  helper_.LaunchFromChromeApps("SiteA");
  helper_.CheckTabCreated();
}

IN_PROC_BROWSER_TEST_F(
    TwoClientWebAppsIntegrationTestMacWinLinux,
    WebAppIntegration_InstCrtShctWindowedSiteC_InListWinSiteC_SwitchProfileClientClient2_InListNotLclyInstSiteC_InstLocallySiteC_InListWinSiteC_NavSiteC_InstIconNotShown_LaunchIconShown) {
  // Test contents are generated by script. Please do not modify!
  // See `chrome/test/webapps/README.md` for more info.
  // Sheriffs: Disabling this test is supported.
  helper_.InstallCreateShortcutWindowed("SiteC");
  helper_.CheckAppInListWindowed("SiteC");
  helper_.SwitchProfileClients("Client2");
  helper_.CheckAppInListNotLocallyInstalled("SiteC");
  helper_.InstallLocally("SiteC");
  helper_.CheckAppInListWindowed("SiteC");
  helper_.NavigateBrowser("SiteC");
  helper_.CheckInstallIconNotShown();
  helper_.CheckLaunchIconShown();
}

IN_PROC_BROWSER_TEST_F(
    TwoClientWebAppsIntegrationTestMacWinLinux,
    WebAppIntegration_InstCrtShctTabbedSiteC_InListTabbedSiteC_SwitchProfileClientClient2_InListNotLclyInstSiteC_InstLocallySiteC_InListTabbedSiteC_NavSiteC_LaunchIconNotShown) {
  // Test contents are generated by script. Please do not modify!
  // See `chrome/test/webapps/README.md` for more info.
  // Sheriffs: Disabling this test is supported.
  helper_.InstallCreateShortcutTabbed("SiteC");
  helper_.CheckAppInListTabbed("SiteC");
  helper_.SwitchProfileClients("Client2");
  helper_.CheckAppInListNotLocallyInstalled("SiteC");
  helper_.InstallLocally("SiteC");
  helper_.CheckAppInListTabbed("SiteC");
  helper_.NavigateBrowser("SiteC");
  helper_.CheckLaunchIconNotShown();
}

IN_PROC_BROWSER_TEST_F(
    TwoClientWebAppsIntegrationTestMacWinLinux,
    DISABLED_WebAppIntegration_TurnSyncOff_InstCrtShctWindowedSiteA_TurnSyncOn_SwitchProfileClientClient2_InListNotLclyInstSiteA) {
  // Test contents are generated by script. Please do not modify!
  // See `chrome/test/webapps/README.md` for more info.
  // Sheriffs: Disabling this test is supported.
  helper_.SyncTurnOff();
  helper_.InstallCreateShortcutWindowed("SiteA");
  helper_.SyncTurnOn();
  helper_.SwitchProfileClients("Client2");
  helper_.CheckAppInListNotLocallyInstalled("SiteA");
}

IN_PROC_BROWSER_TEST_F(
    TwoClientWebAppsIntegrationTestMacWinLinux,
    DISABLED_WebAppIntegration_TurnSyncOff_InstOmniboxSiteA_TurnSyncOn_SwitchProfileClientClient2_InListNotLclyInstSiteA) {
  // Test contents are generated by script. Please do not modify!
  // See `chrome/test/webapps/README.md` for more info.
  // Sheriffs: Disabling this test is supported.
  helper_.SyncTurnOff();
  helper_.InstallOmniboxIcon("SiteA");
  helper_.SyncTurnOn();
  helper_.SwitchProfileClients("Client2");
  helper_.CheckAppInListNotLocallyInstalled("SiteA");
}

IN_PROC_BROWSER_TEST_F(
    TwoClientWebAppsIntegrationTestMacWinLinux,
    WebAppIntegration_TurnSyncOff_InstMenuOptionSiteA_TurnSyncOn_SwitchProfileClientClient2_InListNotLclyInstSiteA) {
  // Test contents are generated by script. Please do not modify!
  // See `chrome/test/webapps/README.md` for more info.
  // Sheriffs: Disabling this test is supported.
  helper_.SyncTurnOff();
  helper_.InstallMenuOption("SiteA");
  helper_.SyncTurnOn();
  helper_.SwitchProfileClients("Client2");
  helper_.CheckAppInListNotLocallyInstalled("SiteA");
}

IN_PROC_BROWSER_TEST_F(
    TwoClientWebAppsIntegrationTestMacWinLinux,
    WebAppIntegration_TurnSyncOff_InstCrtShctTabbedSiteA_TurnSyncOn_SwitchProfileClientClient2_InListNotLclyInstSiteA) {
  // Test contents are generated by script. Please do not modify!
  // See `chrome/test/webapps/README.md` for more info.
  // Sheriffs: Disabling this test is supported.
  helper_.SyncTurnOff();
  helper_.InstallCreateShortcutTabbed("SiteA");
  helper_.SyncTurnOn();
  helper_.SwitchProfileClients("Client2");
  helper_.CheckAppInListNotLocallyInstalled("SiteA");
}

// TODO(crbug.com/1273666): Test failed on Mac.
#if BUILDFLAG(IS_MAC)
#define MAYBE_WebAppIntegration_TurnSyncOff_InstCrtShctWindowedSiteC_TurnSyncOn_SwitchProfileClientClient2_InListNotLclyInstSiteC \
  DISABLED_WebAppIntegration_TurnSyncOff_InstCrtShctWindowedSiteC_TurnSyncOn_SwitchProfileClientClient2_InListNotLclyInstSiteC
#else
#define MAYBE_WebAppIntegration_TurnSyncOff_InstCrtShctWindowedSiteC_TurnSyncOn_SwitchProfileClientClient2_InListNotLclyInstSiteC \
  WebAppIntegration_TurnSyncOff_InstCrtShctWindowedSiteC_TurnSyncOn_SwitchProfileClientClient2_InListNotLclyInstSiteC
#endif
IN_PROC_BROWSER_TEST_F(
    TwoClientWebAppsIntegrationTestMacWinLinux,
    MAYBE_WebAppIntegration_TurnSyncOff_InstCrtShctWindowedSiteC_TurnSyncOn_SwitchProfileClientClient2_InListNotLclyInstSiteC) {
  // Test contents are generated by script. Please do not modify!
  // See `chrome/test/webapps/README.md` for more info.
  // Sheriffs: Disabling this test is supported.
  helper_.SyncTurnOff();
  helper_.InstallCreateShortcutWindowed("SiteC");
  helper_.SyncTurnOn();
  helper_.SwitchProfileClients("Client2");
  helper_.CheckAppInListNotLocallyInstalled("SiteC");
}

IN_PROC_BROWSER_TEST_F(
    TwoClientWebAppsIntegrationTestMacWinLinux,
    WebAppIntegration_TurnSyncOff_InstCrtShctTabbedSiteC_TurnSyncOn_SwitchProfileClientClient2_InListNotLclyInstSiteC) {
  // Test contents are generated by script. Please do not modify!
  // See `chrome/test/webapps/README.md` for more info.
  // Sheriffs: Disabling this test is supported.
  helper_.SyncTurnOff();
  helper_.InstallCreateShortcutTabbed("SiteC");
  helper_.SyncTurnOn();
  helper_.SwitchProfileClients("Client2");
  helper_.CheckAppInListNotLocallyInstalled("SiteC");
}

// TODO(crbug.com/1273666): Test failed on Mac.
// TODO(crbug.com/1281950): Browsers size failure on Mac.
#if BUILDFLAG(IS_MAC)
#define MAYBE_WebAppIntegration_InstCrtShctWindowedSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_InstLocallySiteA_InListWinSiteA_LaunchFromIconSiteA_WindowCreated \
  DISABLED_WebAppIntegration_InstCrtShctWindowedSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_InstLocallySiteA_InListWinSiteA_LaunchFromIconSiteA_WindowCreated
#else
#define MAYBE_WebAppIntegration_InstCrtShctWindowedSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_InstLocallySiteA_InListWinSiteA_LaunchFromIconSiteA_WindowCreated \
  WebAppIntegration_InstCrtShctWindowedSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_InstLocallySiteA_InListWinSiteA_LaunchFromIconSiteA_WindowCreated
#endif
IN_PROC_BROWSER_TEST_F(
    TwoClientWebAppsIntegrationTestMacWinLinux,
    MAYBE_WebAppIntegration_InstCrtShctWindowedSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_InstLocallySiteA_InListWinSiteA_LaunchFromIconSiteA_WindowCreated) {
  // Test contents are generated by script. Please do not modify!
  // See `chrome/test/webapps/README.md` for more info.
  // Sheriffs: Disabling this test is supported.
  helper_.InstallCreateShortcutWindowed("SiteA");
  helper_.CheckWindowCreated();
  helper_.CheckAppInListWindowed("SiteA");
  helper_.SwitchProfileClients("Client2");
  helper_.CheckAppInListNotLocallyInstalled("SiteA");
  helper_.InstallLocally("SiteA");
  helper_.CheckAppInListWindowed("SiteA");
  helper_.LaunchFromLaunchIcon("SiteA");
  helper_.CheckWindowCreated();
}

// TODO(crbug.com/1273666): Test failed on Mac.
// TODO(crbug.com/1281950): Browsers size failure on Mac.
#if BUILDFLAG(IS_MAC)
#define MAYBE_WebAppIntegration_InstOmniboxSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_InstLocallySiteA_InListWinSiteA_LaunchFromIconSiteA_WindowCreated \
  DISABLED_WebAppIntegration_InstOmniboxSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_InstLocallySiteA_InListWinSiteA_LaunchFromIconSiteA_WindowCreated
#else
#define MAYBE_WebAppIntegration_InstOmniboxSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_InstLocallySiteA_InListWinSiteA_LaunchFromIconSiteA_WindowCreated \
  WebAppIntegration_InstOmniboxSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_InstLocallySiteA_InListWinSiteA_LaunchFromIconSiteA_WindowCreated
#endif
IN_PROC_BROWSER_TEST_F(
    TwoClientWebAppsIntegrationTestMacWinLinux,
    MAYBE_WebAppIntegration_InstOmniboxSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_InstLocallySiteA_InListWinSiteA_LaunchFromIconSiteA_WindowCreated) {
  // Test contents are generated by script. Please do not modify!
  // See `chrome/test/webapps/README.md` for more info.
  // Sheriffs: Disabling this test is supported.
  helper_.InstallOmniboxIcon("SiteA");
  helper_.CheckWindowCreated();
  helper_.CheckAppInListWindowed("SiteA");
  helper_.SwitchProfileClients("Client2");
  helper_.CheckAppInListNotLocallyInstalled("SiteA");
  helper_.InstallLocally("SiteA");
  helper_.CheckAppInListWindowed("SiteA");
  helper_.LaunchFromLaunchIcon("SiteA");
  helper_.CheckWindowCreated();
}

// TODO(crbug.com/1273666): Test failed on Mac.
// TODO(crbug.com/1281950): Browsers size failure on Mac.
#if BUILDFLAG(IS_MAC)
#define MAYBE_WebAppIntegration_InstMenuOptionSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_InstLocallySiteA_InListWinSiteA_LaunchFromIconSiteA_WindowCreated \
  DISABLED_WebAppIntegration_InstMenuOptionSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_InstLocallySiteA_InListWinSiteA_LaunchFromIconSiteA_WindowCreated
#else
#define MAYBE_WebAppIntegration_InstMenuOptionSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_InstLocallySiteA_InListWinSiteA_LaunchFromIconSiteA_WindowCreated \
  WebAppIntegration_InstMenuOptionSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_InstLocallySiteA_InListWinSiteA_LaunchFromIconSiteA_WindowCreated
#endif
IN_PROC_BROWSER_TEST_F(
    TwoClientWebAppsIntegrationTestMacWinLinux,
    MAYBE_WebAppIntegration_InstMenuOptionSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_InstLocallySiteA_InListWinSiteA_LaunchFromIconSiteA_WindowCreated) {
  // Test contents are generated by script. Please do not modify!
  // See `chrome/test/webapps/README.md` for more info.
  // Sheriffs: Disabling this test is supported.
  helper_.InstallMenuOption("SiteA");
  helper_.CheckWindowCreated();
  helper_.CheckAppInListWindowed("SiteA");
  helper_.SwitchProfileClients("Client2");
  helper_.CheckAppInListNotLocallyInstalled("SiteA");
  helper_.InstallLocally("SiteA");
  helper_.CheckAppInListWindowed("SiteA");
  helper_.LaunchFromLaunchIcon("SiteA");
  helper_.CheckWindowCreated();
}

// TODO(crbug.com/1273666): Test failed on Mac.
// TODO(crbug.com/1281950): Browsers size failure on Mac.
#if BUILDFLAG(IS_MAC)
#define MAYBE_WebAppIntegration_InstCrtShctWindowedSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_UninstallFromListSiteA_NotInListSiteA_SwitchProfileClientClient1_NotInListSiteA \
  DISABLED_WebAppIntegration_InstCrtShctWindowedSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_UninstallFromListSiteA_NotInListSiteA_SwitchProfileClientClient1_NotInListSiteA
#else
#define MAYBE_WebAppIntegration_InstCrtShctWindowedSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_UninstallFromListSiteA_NotInListSiteA_SwitchProfileClientClient1_NotInListSiteA \
  WebAppIntegration_InstCrtShctWindowedSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_UninstallFromListSiteA_NotInListSiteA_SwitchProfileClientClient1_NotInListSiteA
#endif
IN_PROC_BROWSER_TEST_F(
    TwoClientWebAppsIntegrationTestMacWinLinux,
    MAYBE_WebAppIntegration_InstCrtShctWindowedSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_UninstallFromListSiteA_NotInListSiteA_SwitchProfileClientClient1_NotInListSiteA) {
  // Test contents are generated by script. Please do not modify!
  // See `chrome/test/webapps/README.md` for more info.
  // Sheriffs: Disabling this test is supported.
  helper_.InstallCreateShortcutWindowed("SiteA");
  helper_.CheckWindowCreated();
  helper_.CheckAppInListWindowed("SiteA");
  helper_.SwitchProfileClients("Client2");
  helper_.CheckAppInListNotLocallyInstalled("SiteA");
  helper_.UninstallFromList("SiteA");
  helper_.CheckAppNotInList("SiteA");
  helper_.SwitchProfileClients("Client1");
  helper_.CheckAppNotInList("SiteA");
}

// TODO(crbug.com/1273666): Test failed on Mac.
// TODO(crbug.com/1281950): Browsers size failure on Mac.
#if BUILDFLAG(IS_MAC)
#define MAYBE_WebAppIntegration_InstOmniboxSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_UninstallFromListSiteA_NotInListSiteA_SwitchProfileClientClient1_NotInListSiteA \
  DISABLED_WebAppIntegration_InstOmniboxSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_UninstallFromListSiteA_NotInListSiteA_SwitchProfileClientClient1_NotInListSiteA
#else
#define MAYBE_WebAppIntegration_InstOmniboxSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_UninstallFromListSiteA_NotInListSiteA_SwitchProfileClientClient1_NotInListSiteA \
  WebAppIntegration_InstOmniboxSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_UninstallFromListSiteA_NotInListSiteA_SwitchProfileClientClient1_NotInListSiteA
#endif
IN_PROC_BROWSER_TEST_F(
    TwoClientWebAppsIntegrationTestMacWinLinux,
    MAYBE_WebAppIntegration_InstOmniboxSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_UninstallFromListSiteA_NotInListSiteA_SwitchProfileClientClient1_NotInListSiteA) {
  // Test contents are generated by script. Please do not modify!
  // See `chrome/test/webapps/README.md` for more info.
  // Sheriffs: Disabling this test is supported.
  helper_.InstallOmniboxIcon("SiteA");
  helper_.CheckWindowCreated();
  helper_.CheckAppInListWindowed("SiteA");
  helper_.SwitchProfileClients("Client2");
  helper_.CheckAppInListNotLocallyInstalled("SiteA");
  helper_.UninstallFromList("SiteA");
  helper_.CheckAppNotInList("SiteA");
  helper_.SwitchProfileClients("Client1");
  helper_.CheckAppNotInList("SiteA");
}

// TODO(crbug.com/1273666): Test failed on Mac.
// TODO(crbug.com/1281950): Browsers size failure on Mac.
#if BUILDFLAG(IS_MAC)
#define MAYBE_WebAppIntegration_InstMenuOptionSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_UninstallFromListSiteA_NotInListSiteA_SwitchProfileClientClient1_NotInListSiteA \
  DISABLED_WebAppIntegration_InstMenuOptionSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_UninstallFromListSiteA_NotInListSiteA_SwitchProfileClientClient1_NotInListSiteA
#else
#define MAYBE_WebAppIntegration_InstMenuOptionSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_UninstallFromListSiteA_NotInListSiteA_SwitchProfileClientClient1_NotInListSiteA \
  WebAppIntegration_InstMenuOptionSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_UninstallFromListSiteA_NotInListSiteA_SwitchProfileClientClient1_NotInListSiteA
#endif
IN_PROC_BROWSER_TEST_F(
    TwoClientWebAppsIntegrationTestMacWinLinux,
    MAYBE_WebAppIntegration_InstMenuOptionSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_UninstallFromListSiteA_NotInListSiteA_SwitchProfileClientClient1_NotInListSiteA) {
  // Test contents are generated by script. Please do not modify!
  // See `chrome/test/webapps/README.md` for more info.
  // Sheriffs: Disabling this test is supported.
  helper_.InstallMenuOption("SiteA");
  helper_.CheckWindowCreated();
  helper_.CheckAppInListWindowed("SiteA");
  helper_.SwitchProfileClients("Client2");
  helper_.CheckAppInListNotLocallyInstalled("SiteA");
  helper_.UninstallFromList("SiteA");
  helper_.CheckAppNotInList("SiteA");
  helper_.SwitchProfileClients("Client1");
  helper_.CheckAppNotInList("SiteA");
}

IN_PROC_BROWSER_TEST_F(
    TwoClientWebAppsIntegrationTestMacWinLinux,
    WebAppIntegration_InstCrtShctTabbedSiteA_InListTabbedSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_UninstallFromListSiteA_NotInListSiteA_SwitchProfileClientClient1_NotInListSiteA) {
  // Test contents are generated by script. Please do not modify!
  // See `chrome/test/webapps/README.md` for more info.
  // Sheriffs: Disabling this test is supported.
  helper_.InstallCreateShortcutTabbed("SiteA");
  helper_.CheckAppInListTabbed("SiteA");
  helper_.SwitchProfileClients("Client2");
  helper_.CheckAppInListNotLocallyInstalled("SiteA");
  helper_.UninstallFromList("SiteA");
  helper_.CheckAppNotInList("SiteA");
  helper_.SwitchProfileClients("Client1");
  helper_.CheckAppNotInList("SiteA");
}

// TODO(crbug.com/1273666): Test failed on Mac.
// TODO(crbug.com/1281950): Browsers size failure on Mac.
#if BUILDFLAG(IS_MAC)
#define MAYBE_WebAppIntegration_InstCrtShctWindowedSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_TurnSyncOff_UninstallFromListSiteA_TurnSyncOn_InListNotLclyInstSiteA \
  DISABLED_WebAppIntegration_InstCrtShctWindowedSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_TurnSyncOff_UninstallFromListSiteA_TurnSyncOn_InListNotLclyInstSiteA
#else
#define MAYBE_WebAppIntegration_InstCrtShctWindowedSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_TurnSyncOff_UninstallFromListSiteA_TurnSyncOn_InListNotLclyInstSiteA \
  WebAppIntegration_InstCrtShctWindowedSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_TurnSyncOff_UninstallFromListSiteA_TurnSyncOn_InListNotLclyInstSiteA
#endif
IN_PROC_BROWSER_TEST_F(
    TwoClientWebAppsIntegrationTestMacWinLinux,
    MAYBE_WebAppIntegration_InstCrtShctWindowedSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_TurnSyncOff_UninstallFromListSiteA_TurnSyncOn_InListNotLclyInstSiteA) {
  // Test contents are generated by script. Please do not modify!
  // See `chrome/test/webapps/README.md` for more info.
  // Sheriffs: Disabling this test is supported.
  helper_.InstallCreateShortcutWindowed("SiteA");
  helper_.CheckWindowCreated();
  helper_.CheckAppInListWindowed("SiteA");
  helper_.SwitchProfileClients("Client2");
  helper_.CheckAppInListNotLocallyInstalled("SiteA");
  helper_.SyncTurnOff();
  helper_.UninstallFromList("SiteA");
  helper_.SyncTurnOn();
  helper_.CheckAppInListNotLocallyInstalled("SiteA");
}

// TODO(crbug.com/1273666): Test failed on Mac.
// TODO(crbug.com/1281950): Browsers size failure on Mac.
#if BUILDFLAG(IS_MAC)
#define MAYBE_WebAppIntegration_InstOmniboxSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_TurnSyncOff_UninstallFromListSiteA_TurnSyncOn_InListNotLclyInstSiteA \
  DISABLED_WebAppIntegration_InstOmniboxSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_TurnSyncOff_UninstallFromListSiteA_TurnSyncOn_InListNotLclyInstSiteA
#else
#define MAYBE_WebAppIntegration_InstOmniboxSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_TurnSyncOff_UninstallFromListSiteA_TurnSyncOn_InListNotLclyInstSiteA \
  WebAppIntegration_InstOmniboxSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_TurnSyncOff_UninstallFromListSiteA_TurnSyncOn_InListNotLclyInstSiteA
#endif
IN_PROC_BROWSER_TEST_F(
    TwoClientWebAppsIntegrationTestMacWinLinux,
    MAYBE_WebAppIntegration_InstOmniboxSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_TurnSyncOff_UninstallFromListSiteA_TurnSyncOn_InListNotLclyInstSiteA) {
  // Test contents are generated by script. Please do not modify!
  // See `chrome/test/webapps/README.md` for more info.
  // Sheriffs: Disabling this test is supported.
  helper_.InstallOmniboxIcon("SiteA");
  helper_.CheckWindowCreated();
  helper_.CheckAppInListWindowed("SiteA");
  helper_.SwitchProfileClients("Client2");
  helper_.CheckAppInListNotLocallyInstalled("SiteA");
  helper_.SyncTurnOff();
  helper_.UninstallFromList("SiteA");
  helper_.SyncTurnOn();
  helper_.CheckAppInListNotLocallyInstalled("SiteA");
}

// TODO(crbug.com/1273666): Test failed on Mac.
#if BUILDFLAG(IS_MAC)
#define MAYBE_WebAppIntegration_InstMenuOptionSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_TurnSyncOff_UninstallFromListSiteA_TurnSyncOn_InListNotLclyInstSiteA \
  DISABLED_WebAppIntegration_InstMenuOptionSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_TurnSyncOff_UninstallFromListSiteA_TurnSyncOn_InListNotLclyInstSiteA
#else
#define MAYBE_WebAppIntegration_InstMenuOptionSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_TurnSyncOff_UninstallFromListSiteA_TurnSyncOn_InListNotLclyInstSiteA \
  WebAppIntegration_InstMenuOptionSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_TurnSyncOff_UninstallFromListSiteA_TurnSyncOn_InListNotLclyInstSiteA
#endif
IN_PROC_BROWSER_TEST_F(
    TwoClientWebAppsIntegrationTestMacWinLinux,
    MAYBE_WebAppIntegration_InstMenuOptionSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_TurnSyncOff_UninstallFromListSiteA_TurnSyncOn_InListNotLclyInstSiteA) {
  // Test contents are generated by script. Please do not modify!
  // See `chrome/test/webapps/README.md` for more info.
  // Sheriffs: Disabling this test is supported.
  helper_.InstallMenuOption("SiteA");
  helper_.CheckWindowCreated();
  helper_.CheckAppInListWindowed("SiteA");
  helper_.SwitchProfileClients("Client2");
  helper_.CheckAppInListNotLocallyInstalled("SiteA");
  helper_.SyncTurnOff();
  helper_.UninstallFromList("SiteA");
  helper_.SyncTurnOn();
  helper_.CheckAppInListNotLocallyInstalled("SiteA");
}

IN_PROC_BROWSER_TEST_F(
    TwoClientWebAppsIntegrationTestMacWinLinux,
    WebAppIntegration_InstCrtShctTabbedSiteA_InListTabbedSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_TurnSyncOff_UninstallFromListSiteA_TurnSyncOn_InListNotLclyInstSiteA) {
  // Test contents are generated by script. Please do not modify!
  // See `chrome/test/webapps/README.md` for more info.
  // Sheriffs: Disabling this test is supported.
  helper_.InstallCreateShortcutTabbed("SiteA");
  helper_.CheckAppInListTabbed("SiteA");
  helper_.SwitchProfileClients("Client2");
  helper_.CheckAppInListNotLocallyInstalled("SiteA");
  helper_.SyncTurnOff();
  helper_.UninstallFromList("SiteA");
  helper_.SyncTurnOn();
  helper_.CheckAppInListNotLocallyInstalled("SiteA");
}

// TODO(crbug.com/1273666): Test failed on Mac.
// TODO(crbug.com/1281950): Browsers size failure on Mac.
#if BUILDFLAG(IS_MAC)
#define MAYBE_WebAppIntegration_InstCrtShctWindowedSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_TurnSyncOff_UninstallFromMenuSiteA_TurnSyncOn_InListNotLclyInstSiteA \
  DISABLED_WebAppIntegration_InstCrtShctWindowedSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_TurnSyncOff_UninstallFromMenuSiteA_TurnSyncOn_InListNotLclyInstSiteA
#else
#define MAYBE_WebAppIntegration_InstCrtShctWindowedSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_TurnSyncOff_UninstallFromMenuSiteA_TurnSyncOn_InListNotLclyInstSiteA \
  WebAppIntegration_InstCrtShctWindowedSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_TurnSyncOff_UninstallFromMenuSiteA_TurnSyncOn_InListNotLclyInstSiteA
#endif
IN_PROC_BROWSER_TEST_F(
    TwoClientWebAppsIntegrationTestMacWinLinux,
    MAYBE_WebAppIntegration_InstCrtShctWindowedSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_TurnSyncOff_UninstallFromMenuSiteA_TurnSyncOn_InListNotLclyInstSiteA) {
  // Test contents are generated by script. Please do not modify!
  // See `chrome/test/webapps/README.md` for more info.
  // Sheriffs: Disabling this test is supported.
  helper_.InstallCreateShortcutWindowed("SiteA");
  helper_.CheckWindowCreated();
  helper_.CheckAppInListWindowed("SiteA");
  helper_.SwitchProfileClients("Client2");
  helper_.CheckAppInListNotLocallyInstalled("SiteA");
  helper_.SyncTurnOff();
  helper_.UninstallFromMenu("SiteA");
  helper_.SyncTurnOn();
  helper_.CheckAppInListNotLocallyInstalled("SiteA");
}

// TODO(crbug.com/1273666): Test failed on Mac.
// TODO(crbug.com/1281950): Browsers size failure on Mac.
#if BUILDFLAG(IS_MAC)
#define MAYBE_WebAppIntegration_InstOmniboxSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_TurnSyncOff_UninstallFromMenuSiteA_TurnSyncOn_InListNotLclyInstSiteA \
  DISABLED_WebAppIntegration_InstOmniboxSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_TurnSyncOff_UninstallFromMenuSiteA_TurnSyncOn_InListNotLclyInstSiteA
#else
#define MAYBE_WebAppIntegration_InstOmniboxSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_TurnSyncOff_UninstallFromMenuSiteA_TurnSyncOn_InListNotLclyInstSiteA \
  WebAppIntegration_InstOmniboxSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_TurnSyncOff_UninstallFromMenuSiteA_TurnSyncOn_InListNotLclyInstSiteA
#endif
IN_PROC_BROWSER_TEST_F(
    TwoClientWebAppsIntegrationTestMacWinLinux,
    MAYBE_WebAppIntegration_InstOmniboxSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_TurnSyncOff_UninstallFromMenuSiteA_TurnSyncOn_InListNotLclyInstSiteA) {
  // Test contents are generated by script. Please do not modify!
  // See `chrome/test/webapps/README.md` for more info.
  // Sheriffs: Disabling this test is supported.
  helper_.InstallOmniboxIcon("SiteA");
  helper_.CheckWindowCreated();
  helper_.CheckAppInListWindowed("SiteA");
  helper_.SwitchProfileClients("Client2");
  helper_.CheckAppInListNotLocallyInstalled("SiteA");
  helper_.SyncTurnOff();
  helper_.UninstallFromMenu("SiteA");
  helper_.SyncTurnOn();
  helper_.CheckAppInListNotLocallyInstalled("SiteA");
}

// TODO(crbug.com/1273666): Test failed on Mac.
// TODO(crbug.com/1281950): Browsers size failure on Mac.
#if BUILDFLAG(IS_MAC)
#define MAYBE_WebAppIntegration_InstMenuOptionSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_TurnSyncOff_UninstallFromMenuSiteA_TurnSyncOn_InListNotLclyInstSiteA \
  DISABLED_WebAppIntegration_InstMenuOptionSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_TurnSyncOff_UninstallFromMenuSiteA_TurnSyncOn_InListNotLclyInstSiteA
#else
#define MAYBE_WebAppIntegration_InstMenuOptionSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_TurnSyncOff_UninstallFromMenuSiteA_TurnSyncOn_InListNotLclyInstSiteA \
  WebAppIntegration_InstMenuOptionSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_TurnSyncOff_UninstallFromMenuSiteA_TurnSyncOn_InListNotLclyInstSiteA
#endif
IN_PROC_BROWSER_TEST_F(
    TwoClientWebAppsIntegrationTestMacWinLinux,
    MAYBE_WebAppIntegration_InstMenuOptionSiteA_WindowCreated_InListWinSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_TurnSyncOff_UninstallFromMenuSiteA_TurnSyncOn_InListNotLclyInstSiteA) {
  // Test contents are generated by script. Please do not modify!
  // See `chrome/test/webapps/README.md` for more info.
  // Sheriffs: Disabling this test is supported.
  helper_.InstallMenuOption("SiteA");
  helper_.CheckWindowCreated();
  helper_.CheckAppInListWindowed("SiteA");
  helper_.SwitchProfileClients("Client2");
  helper_.CheckAppInListNotLocallyInstalled("SiteA");
  helper_.SyncTurnOff();
  helper_.UninstallFromMenu("SiteA");
  helper_.SyncTurnOn();
  helper_.CheckAppInListNotLocallyInstalled("SiteA");
}

// TODO(crbug.com/1273666): Test failing frequently on Mac.
#if BUILDFLAG(IS_MAC)
#define MAYBE_WebAppIntegration_InstCrtShctTabbedSiteA_InListTabbedSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_TurnSyncOff_UninstallFromMenuSiteA_TurnSyncOn_InListNotLclyInstSiteA \
  DISABLED_WebAppIntegration_InstCrtShctTabbedSiteA_InListTabbedSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_TurnSyncOff_UninstallFromMenuSiteA_TurnSyncOn_InListNotLclyInstSiteA
#else
#define MAYBE_WebAppIntegration_InstCrtShctTabbedSiteA_InListTabbedSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_TurnSyncOff_UninstallFromMenuSiteA_TurnSyncOn_InListNotLclyInstSiteA \
  WebAppIntegration_InstCrtShctTabbedSiteA_InListTabbedSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_TurnSyncOff_UninstallFromMenuSiteA_TurnSyncOn_InListNotLclyInstSiteA
#endif
IN_PROC_BROWSER_TEST_F(
    TwoClientWebAppsIntegrationTestMacWinLinux,
    MAYBE_WebAppIntegration_InstCrtShctTabbedSiteA_InListTabbedSiteA_SwitchProfileClientClient2_InListNotLclyInstSiteA_TurnSyncOff_UninstallFromMenuSiteA_TurnSyncOn_InListNotLclyInstSiteA) {
  // Test contents are generated by script. Please do not modify!
  // See `chrome/test/webapps/README.md` for more info.
  // Sheriffs: Disabling this test is supported.
  helper_.InstallCreateShortcutTabbed("SiteA");
  helper_.CheckAppInListTabbed("SiteA");
  helper_.SwitchProfileClients("Client2");
  helper_.CheckAppInListNotLocallyInstalled("SiteA");
  helper_.SyncTurnOff();
  helper_.UninstallFromMenu("SiteA");
  helper_.SyncTurnOn();
  helper_.CheckAppInListNotLocallyInstalled("SiteA");
}

}  // namespace
}  // namespace web_app
